package ooday01;
/** Student类的测试类*/
public class StudentTest {
    public static void main(String[] args) {
        // 创建一个学生对象
        Student zg = new Student();
        // 访问成员变量
        zg.name = "张光";
        zg.age = 22;
        zg.className="一班";
        zg.stuId = "02";

        // 调用方法
        zg.study();
        zg.sayHi();
        zg.playWith("李林");

        System.out.println("------------");

        // 船舰一个学生对象
        Student s = new Student();
        s.name = "小花";
        s.age = 25;
        s.stuId = "jsd2410";
        s.study();
        s.sayHi();
        s.playWith("张光");

        System.out.println("------------");

        // 创建一个学生对象
        // 给所有成员变量赋默认值
        Student ll = new Student();
        ll.study();
        ll.sayHi();
        ll.playWith("小明");

    }
}
